package com.itheima.a01mathdemo01;

/***
 *@title MathDemo03
 *@description <TODO description class purpose>
 *@author 12468
 *@version 1.0.0
 *@create 2024-11-13 21:36
 **/
public class MathDemo03 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 100; i <= 999; i++) {
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100 % 10;
            double num = Math.pow(ge, 3) + Math.pow(shi, 3) + Math.pow(bai, 3);
            if(num == i) {
                System.out.println(i);
                count++;
            }
        }
        System.out.println(count);
    }

}
